from socket import * # type: ignore
from utils import decode_data

udp_socket = socket(AF_INET, SOCK_DGRAM)

udp_socket.bind(("", 8080))

bytes_arr, address = udp_socket.recvfrom(1024)
msg = decode_data(bytes_arr)
print("收到来自{}的消息：{}".format(address, msg))

udp_socket.close()